<link type="text/css" href="/admins/js/pagerView/pager-view.css" rel="stylesheet" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/jquery/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/admins/js/jquery/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/admins/js/pagerView/pager-view.js"></script>
<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#form1 #sel #dateinbegin" ).datepicker();
        $( "#form1 #sel #dateinend" ).datepicker();
    });
</script>

<form action="/admini/managewaybill/waybillcost"  method="post" style="margin:0px" id="form1">
    <div style=" border:1px solid #DDDDDD; padding:2px; margin:2px;line-height: 36px;" id='sel'> 
        <label for="quick">快速搜索：</label><input type="text" id="quick" name="name" value="<?php echo $this->name; ?>"/>
         <label for="starttime">日期时间：</label><input type="text" id="dateinbegin" name="dateinbegin" value="<?php echo $this->dateinbegin; ?>" />
         <label for="endtime">--&nbsp;</label><input type="text" id="dateinend" name="dateinend" value="<?php echo $this->dateinend; ?>" />
            <label for="agent">发货渠道：</label>
            <select name="agentid" id="agentid">
                        <?php foreach ($this->agentcomp as $agentcomp) {?>
                        <option value="<?php echo $agentcomp->id;?>" <?php if($this->agentid==$agentcomp->id){echo "selected";} ?>><?php echo $agentcomp->name;?></option>
                        <?php }?>
                        <option value="" <?php if($this->agentid==""){echo "selected";}?>>所有</option>
             </select>
        <input type="submit" id="queryButton" name="queryButton" value="查询"/>
    </div>
</form>
<div class="dataTable" id="regoodslist" style="display:block;">
    <table>         
    <tfoot>
      <tr><td colspan="14"></td>
      </tr>
    </tfoot>
        <tr>
            <th class="w1" width="5%" nowrap>日期</th>
            <th class="w2" width="8%" nowrap>物流单号</th>
            <th class="w3" width="3%" nowrap>件数</th>
            <th class="w4" width="5%" nowrap>实重（KG）</th>
            <th class="w5" width="5%" nowrap>材重(KG)</th>
            <th class="w6" width="10%" nowrap>运送方式</th>
            <th class="w7" width="6%" nowrap>发货渠道</th>
            <th class="w8" width="6%" nowrap>目的地</th>
            <th class="w9" width="5%" nowrap>品名</th>
            <th class="w10" width="8%" nowrap>成本(元)</th>
            <th class="w11" width="5%" nowrap>币别</th>
            <th class="w12" width="10%" nowrap>改单号</th>
            <th class="w13" width="10%" nowrap>转单号</th>
            <th class="w12" width="15%" nowrap>备注</th>
            <th class="w15"></th>
        </tr>
        
        <?php
          if($this->costlist){
              foreach ($this->costlist as $Item){
              
        ?>
        <tr>
            <td class="w1" nowrap><?php echo $Item->crdatetime; ?></td>
            <td class="w2" nowrap><?php echo $Item->outstoreno; ?></td>
            <td class="w3" nowrap><?php echo $Item->num;?></td>
            <td class="w4" nowrap><?php echo $Item->weight; ?></td>
            <td class="w5" nowrap><?php echo $Item->bagweight;?></td>
            <td class="w6" nowrap><?php echo $Item->channel;?></td>
            <td class="w7" nowrap><?php echo $Item->AgentName->name;?></td>
            <td class="w8" nowrap><?php echo $Item->destination;?></td>
            <td class="w9" nowrap><?php echo $Item->name;?></td>
            <td class="w10" nowrap><?php echo $Item->OutnoCost?$Item->OutnoCost->money:"暂无";?></td>
            <td class="w11" nowrap><?php echo $Item->OutnoCost?$Item->OutnoCost->currency:"暂无";?></td>
            <td class="w2" nowrap><?php echo $Item->changeno;?></td> 
            <td class="w13" nowrap><?php echo $Item->turnno;?></td>
            <td class="w2" nowrap><?php echo $Item->OutnoCost?$Item->OutnoCost->remark:"暂无";?></td>
            <td class="w15"></td>
        </tr>
        <?php
              }
          }
        ?>
    </table>
</div> 

<div class="toolbar">    
    <?php echo $this->partial('paging.phtml', array("pages" => $this->costall,"pamas"=>"name=".$this->name."&dateinbegin=".$this->dateinbegin."&dateinend=".$this->dateinend."&agentid=".$this->agentid)); ?>
</div>


<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#starttime" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
        $( "#endtime" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>